﻿using RpcHelper.Validate;

namespace Wedonek.RpcStore.Service.Model
{
        /// <summary>
        /// 任务设置参数
        /// </summary>
        public class AutoTaskSetParam
        {
                /// <summary>
                /// 任务名
                /// </summary>
                [NullValidate ("rpc.task.name.null")]
                [LenValidate ("rpc.task.name.len", 2, 50)]
                public string TaskName
                {
                        get;
                        set;
                }
                /// <summary>
                /// 任务说明
                /// </summary>
                [LenValidate ("rpc.task.show.len", 0, 255)]
                public string TaskShow
                {
                        get;
                        set;
                }
                /// <summary>
                /// 任务优先级
                /// </summary>
                [NumValidate ("rpc.task.priority.error", 0, int.MaxValue)]
                public int TaskPriority
                {
                        get;
                        set;
                }
                /// <summary>
                /// 任务开始的步骤
                /// </summary>
                [NumValidate ("rpc.task.begin.error", 0, short.MaxValue)]
                public short BeginItem
                {
                        get;
                        set;
                }
                /// <summary>
                /// 任务失败时通知的Emall列表
                /// </summary>
                [FormatValidate ("rpc.task.fail.email.error", ValidateFormat.Email)]
                public string[] FailEmall
                {
                        get;
                        set;
                }
                /// <summary>
                /// 是否启用
                /// </summary>
                public bool IsEnable
                {
                        get;
                        set;
                }
        }
}
